import java.io.IOException;
import java.util.ArrayList;

public class E {
    public static void main(String[] args) {
        String s = null;
        ArrayList arrayList = new ArrayList();
        try {
            s = new C().read();
        } catch (IOException e) {
            e.printStackTrace();
        }
        String[] strings = s.split(",");
        for (int i = 0; i < strings.length; i++) {
            String string = strings[i];
            if (isNumeric1(string)){
                arrayList.add(string);
            }
        }

        final int size = arrayList.size();
        String[] newString = (String[]) arrayList.toArray(new String[size]);

        F.main(newString);

    }

    public static boolean isNumeric1(String str){
        try {
            Integer.parseInt(str);
            return true;
        }catch (Exception e){
            return false;
        }
    }
}
